cmake_minimum_required(VERSION 3.5)

set(D1 ON)

if(D1)
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_C_COMPILER "riscv64-unknown-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "riscv64-unknown-linux-gnu-g++")
set(CMAKE_FIND_ROOT_PATH /home/tao/tina-d1-open/out/d1-nezha/staging_dir/toolchain)
endif()

project(ImageTransD1 C CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(WIN32)
    include_directories(
        inc
        D:\\AKE\\git_projects\\unpv13e
        D:\\AKE\\git_projects\\unpv13e\\lib
        D:\\AKE\\git_projects\\muduo
        D:\\AKE\\EMBED\\FH_SDK\\linux\\FH885XV200_IPC_V1.0.2_20201211\\board_support\\toolchain\\include\\gcc\\6.5.0
        D:\\AKE\\EMBED\\FH_SDK\\linux\\FH885XV200_IPC_V1.0.2_20201211\\board_support\\toolchain\\include\\usr\\include
        )
elseif(D1)
    message("d1")
    include_directories(
        inc
        /home/tao/D1/unpv13e/lib
        /home/tao/D1/unpv13e
        /home/tao/D1/muduo-riscv
        /usr/local/include
        /home/tao/D1/ncnn/src
        /home/tao/D1/ncnn/build-c906/src
        )
    link_directories(
        libs
        #/home/tao/D1/unpv13e
        #/home/tao/D1/muduo-riscv/build/lib
        #/home/tao/D1/ncnn/build-c906/src
        )
else()
    include_directories(
        /home/ye/Desktop/git_projects/unpv13e/lib
        /home/ye/Desktop/git_projects/unpv13e
        )
    link_directories(
        /home/ye/Desktop/git_projects/unpv13e
        )
endif()

file(GLOB SC_FILES src/*.cpp)

add_executable(ImageTransD1 ${SC_FILES})
target_compile_definitions(ImageTransD1 PUBLIC USE_NCNN_SIMPLEOCV)
target_link_libraries(ImageTransD1 ncnn muduo_net muduo_base unp pthread rt)

